# 第一个python语言
print("hello word!!!");
i=3
if i==2:
    print("i 是 2");
else:
    print("i 是 其他");
		
a = 100
if a >= 0:
    print(a);print("同一行代码展示");print(a/i)
else:
    print(-a)
	
# 定义一个类
def printHello():
    "第一个函数";
    print("使用函数打印 helloword!!!");
    return;

printHello()

class Student():
    "第一个类";
    def __init__(self, name, age , sex ):
        "构造函数"
        print("Student自定义函数");
        self.name = name;
        self.age = age;
        self.sex = sex;
		 
# 创建小米类
xiaoming = Student("小米",sex="男",age=18)
print (xiaoming.name);print (xiaoming.sex);

# 创建大米类,注意 大米 和小米的sex 类型不一样哦
daming = Student("小米",sex=1,age=18)
print (daming.name);print (daming.sex);


if xiaoming==daming:
    print("大米和小米对比成功")
else:
    print("大米和小米对比失败")

#逻辑运算符  and or not
print(222 and 0);
print(0 or 222);

# 循环
while(i<10):
    print (i);
    i+=1;

# for可以循环字符串 6666
for ss in "helloword":
    print(ss)
